<form nz-form [formGroup]="validateForm">
	<nz-form-item>
		<nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="loginName">账号名称</nz-form-label>
		<nz-form-control [nzSm]="14" [nzXs]="24" nzErrorTip="账号名称不能为空!">
			<input nz-input formControlName="loginName" id="loginName" />
		</nz-form-control>
	</nz-form-item>
	<nz-form-item>
		<nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="userName">用户名称</nz-form-label>
		<nz-form-control [nzSm]="14" [nzXs]="24" nzErrorTip="用户名称不能为空!">
			<input nz-input formControlName="userName" id="userName" />
		</nz-form-control>
	</nz-form-item>
	<nz-form-item>
		<nz-form-label [nzSm]="6" [nzXs]="24" nzFor="mobile">手机号</nz-form-label>
		<nz-form-control [nzSm]="14" [nzXs]="24" >
			<input nz-input formControlName="mobile" id="mobile" />
		</nz-form-control>
	</nz-form-item>
	<nz-form-item>
		<nz-form-label [nzSm]="6" [nzXs]="24" nzFor="password" [nzRequired]="!id">密码</nz-form-label>
		<nz-form-control [nzSm]="14" [nzXs]="24" nzErrorTip="密码不能为空!">
			<input nz-input type="password" id="password" formControlName="password"
				(ngModelChange)="updateConfirmValidator()" />
		</nz-form-control>
	</nz-form-item>
	<nz-form-item>
		<nz-form-label [nzSm]="6" [nzXs]="24" nzFor="checkPassword" [nzRequired]="!id">确认密码</nz-form-label>
		<nz-form-control [nzSm]="14" [nzXs]="24" [nzErrorTip]="errorTpl">
			<input nz-input type="password" formControlName="checkPassword" id="checkPassword" />
			<ng-template #errorTpl let-control>
				<ng-container *ngIf="control.hasError('required')">
					确认密码不能为空!
				</ng-container>
				<ng-container *ngIf="control.hasError('confirm')">
					两次密码输入不一致!
				</ng-container>
			</ng-template>
		</nz-form-control>
	</nz-form-item>
	<nz-form-item>
		<nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="roleList">用户角色</nz-form-label>
		<nz-form-control [nzSm]="14" [nzXs]="24" nzErrorTip="用户角色不能为空!">
			<nz-checkbox-group  formControlName="roleList"></nz-checkbox-group>
		</nz-form-control>
	</nz-form-item>
</form>